﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Surveillance
{
    public class GameObject
    {
        #region Declerations

        protected Vector2 worldPosition;
        protected Vector2 velocity;
        protected float angle = 0.0f;
        protected int frameWidth;
        protected int frameHeight;

        protected Vector2 prevPosition;

        protected bool enabled;
        protected bool flipped = false;

        protected Rectangle collisionRectangle;
        protected int collideWidth;
        protected int collideHeight;
        protected bool codeBasedBlocks = true;

        protected float drawDepth = 0.85f;
        protected string currentAnimation;

        #endregion

        #region Properties

        public bool Enabled
        {
            get { return enabled; }
            set { enabled = value; }
        }

        public Vector2 WorldPosition
        {
            get { return worldPosition; }
            set { worldPosition = value; }
        }

        public Vector2 WorldCenter
        {
            get
            {
                return new Vector2(
                    (int)WorldPosition.X + (int)(frameWidth / 2),
                    (int)WorldPosition.Y + (int)(frameHeight / 2));
            }
        }

        public Rectangle WorldRectangle
        {
            get
            {
                return new Rectangle(
                    (int)WorldPosition.X,
                    (int)WorldPosition.Y,
                    frameWidth,
                    frameHeight);
            }
        }

        public Rectangle CollisionRectangle
        {
            get
            {
                return new Rectangle(
                    (int)WorldPosition.X + collisionRectangle.X,
                    (int)WorldPosition.Y + collisionRectangle.Y,
                    collisionRectangle.Width,
                    collisionRectangle.Height);
            }
            set { collisionRectangle = value; }
        }

        #endregion

        #region Helper Methods


        #endregion

        #region Update and Draw

        public virtual void Update(GameTime gameTime)
        {
        

           
        }

        

        #endregion
    }
}
